package com.xuhuan.client.business.splitfile.service;


import com.xuhuan.client.business.splitfile.dto.SplitFileResult;
import com.xuhuan.client.business.splitfile.dto.ZoneInfo;
import com.xuhuan.client.business.splitfile.entity.FileSplitLog;
import com.xuhuan.client.business.splitfile.properties.FileSplitProperties;
import com.xuhuan.client.business.splitfile.vo.SaveFileSplitLogVO;
import com.xuhuan.client.result.RequestResult;

import java.io.File;
import java.util.concurrent.Future;

/**
 * @Author huan.xu
 * @Date 2023/6/17 9:18
 * @Description
 */
public interface IFileSplitFacadeService {

    /**
     * 获取参数配置
     *
     * @return
     */
    FileSplitProperties getFileSplitProperties();

    /**
     * 文件分片
     *
     * @param file
     * @return
     */
    SplitFileResult splitFile(File file);



    /**
     * 保存附件分片日志
     */
    RequestResult saveFileSplitLog(SaveFileSplitLogVO saveFileSplitLogVO);

    /**
     * 异步给协会端发送分片文件
     * @param zoneInfo
     * @param fileMd5
     * @param zoneProfixName
     * @return
     */
    Future<String> receiveSignZoneFile(ZoneInfo zoneInfo,String fileMd5, String zoneProfixName);
}
